package com.intelligencesoft.pss.realm.auth;

import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.crypto.hash.Md5Hash;



/**
 * 
 *	自定义token
 * @author 黄莹璐
 *
 */
public class CustomUsernamePasswordToken extends UsernamePasswordToken {
	
	private static final long serialVersionUID = 1L;
	
	public CustomUsernamePasswordToken() {
	}
	public CustomUsernamePasswordToken(String username, char[] password,
			boolean rememberMe, String host) {
		super(username, password, rememberMe, host);
	}
	public CustomUsernamePasswordToken(String username, char[] password,
			boolean rememberMe) {
		super(username, password, rememberMe);
	}
	public CustomUsernamePasswordToken(String username, char[] password,
			String host) {
		super(username, password, host);
	}
	public CustomUsernamePasswordToken(String username, char[] password) {
		super(username, password);
	}
	public CustomUsernamePasswordToken(String username, String password,
			boolean rememberMe, String host) {
		super(username, password, rememberMe, host);
	}
	public CustomUsernamePasswordToken(String username, String password,
			boolean rememberMe) {
		super(username, password, rememberMe);
	}
	public CustomUsernamePasswordToken(String username, String password,
			String host) {
		super(username, password, host);
	}
	public CustomUsernamePasswordToken(String username, String password) {
		super(username, password);
	} 
	@Override
	public Object getCredentials() {
		return new Md5Hash(getPassword()).toHex();
	}
}
